package com.fling.background;

import com.badlogic.gdx.math.Vector2;
import com.fling.Locator;
import com.fling.entity.Entity;

public class BackgroundBlock extends Entity {

	public float SPEED = 0.5f;

	public BackgroundBlock(Vector2 pos) {
		super(pos, BLOCK_BACKGROUND_PATH);
	}

	@Override
	public void update(float delta) {
		position.y = position.y - (Locator.getYGameSpeed() * delta * Locator.getOverallGameSpeed() * SPEED);
		if (sprite.getY() < -BLOCK_HEIGHT) {
			delete();
		}
	}

}
